import java.util.*;

class StudentOf2019EE{
    private String _name;
    private int _money;
    private static int _numberOfObjects = 0;
    private static int _classMoney = 0;
    public  StudentOf2019EE(String name){
        _name = name;
        _money = 100;
        _numberOfObjects++;
    }
    public  StudentOf2019EE(String name,int money){
        _name = name;
        _money = money;
        _numberOfObjects++;
    }

    public String getName() {
        return _name;
    }

    public int getMoney() {
        return _money;
    }
    public void payClazzMoney(int amount) {
        if(amount>_money) {
            _classMoney+=_money;
            _money = 0;
        }
        else {
            _classMoney+=amount;
            _money-=amount;
        }
    }
    public static void clazzActivity(int amount)
    {
        if(_classMoney>=amount)
        {
            _classMoney-=amount;
        }
        else{
            _classMoney = 0;
        }
    }
    public static int getNumberOfObjects() {
        return _numberOfObjects;
    }

    public static int getClazzMoney() {
        return _classMoney;
    }

}


public class Main2 {
    public static void main(String args[]){
        Scanner input = new Scanner(System.in);
        System.out.println("numberOfObjects=" + StudentOf2019EE.getNumberOfObjects() + ",clazzMoney=" + StudentOf2019EE.getClazzMoney());

        StudentOf2019EE a = new StudentOf2019EE("Tom");
        StudentOf2019EE b = new StudentOf2019EE("Jerry", 200);
        StudentOf2019EE c = a;

        a.payClazzMoney(input.nextInt());
        System.out.println("numberOfObjects=" + StudentOf2019EE.getNumberOfObjects() + ",clazzMoney=" + StudentOf2019EE.getClazzMoney());

        b.payClazzMoney(input.nextInt());
        System.out.println("numberOfObjects=" + StudentOf2019EE.getNumberOfObjects() + ",clazzMoney=" + StudentOf2019EE.getClazzMoney());

        c.payClazzMoney(input.nextInt());
        System.out.println("numberOfObjects=" + StudentOf2019EE.getNumberOfObjects() + ",clazzMoney=" + StudentOf2019EE.getClazzMoney());

        StudentOf2019EE.clazzActivity(input.nextInt());
        System.out.println("numberOfObjects=" + StudentOf2019EE.getNumberOfObjects() + ",clazzMoney=" + StudentOf2019EE.getClazzMoney());
    }
}

/* 请在这里填写答案 */
/* 请在这里填写答案 */
